//
//  MethodOfPaymentViewTableViewCell.m
//  BaseFrame
//
//  Created by 吕金状 on 2017/8/9.
//  Copyright © 2017年 com.mxh. All rights reserved.
//

#import "MethodOfPaymentViewTableViewCell.h"

@interface MethodOfPaymentViewTableViewCell ()

Strong UILabel *titleLabel;

@end

@implementation MethodOfPaymentViewTableViewCell

- (id)initWithCellIdentifier:(NSString *)cellID{
    self = [super initWithCellIdentifier:cellID];
    if (self) {
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        _titleLabel  = [[UILabel alloc]init];
        _titleLabel.font = DEF_FontSize_14;
        _titleLabel.textColor = getColor(textColor);
        _titleLabel.textAlignment = NSTextAlignmentCenter;
        [self.contentView addSubview:_titleLabel];
        [self layoutFrame];
    }
    return self;
}

- (void)layoutFrame{
    __weak __typeof(self)weakSelf = self;
    [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(0);
        make.right.mas_equalTo(0);
        make.left.mas_equalTo(0);
        make.bottom.mas_equalTo(0);
    }];
}

- (void)setChooseString:(NSString *)chooseString{
    _chooseString = chooseString;
    if ([chooseString intValue] == self.indexPath.row) {
        self.titleLabel.textColor = getColor(mainColor);
    }else{
        self.titleLabel.textColor = getColor(textColor);
    }
}

- (void)setModel:(NSDictionary *)model{
    _model = model;
    self.titleLabel.text = model[@"title"];
}


@end
